package a.g;

import a.a.kb;
import a.c.e;
import a.c.q;
import a.c.x;
import a.f.n.gb;
import a.f.n.j;
import a.f.n.m;
import a.f.n.n;
import a.f.n.r;
import a.f.n.t;
import a.i.p;

abstract class b
{
  public static final b a = new b()
  {
    protected void a()
    {
      super.a();
      r localr = new r();
      localr.a(k.c_.a);
      localr.a(1);
      b(kb.h(this.h), localr);
    }
  };
  public static final b b = new b()
  {
    protected void a()
    {
      super.a();
      r localr = new r(k.b_.b, k.b_.b);
      localr.a(k.c_.a);
      localr.a(1);
      b(kb.h(this.h), localr);
    }
  };
  public static final b c = new b()
  {
    protected void a()
    {
      super.a();
      a.f.n.o localo = new a.f.n.o();
      localo.a(20.0D);
      this.i.a(localo);
    }
  };
  public static final b d = new b()
  {
    protected void a()
    {
      int k = f.p;
      boolean bool = f.o;
      super.a();
      e locale1 = kb.h(this.h);
      t localt1 = new t(k.b_.c);
      localt1.a(k.c_.a);
      t localt2 = new t();
      localt2.a(k.c_.a);
      a(locale1, new n(k.b_.a, localt1, localt2));
      int i = locale1.e() / 2;
      this.h = ((a.f.o)locale1.g());
      int j = 0;
      a.c.d locald = locale1.h();
      label148:
      do
      {
        if (locald == null) {
          break;
        }
        e locale2 = locald.f();
        if (k == 0)
        {
          if (j < i) {
            b(locale2, localt1);
          }
        }
        else
        {
          if (k != 0) {
            continue;
          }
          if (!bool) {
            break label148;
          }
        }
        b(locale2, localt2);
        j++;
        locald = locald.i();
      } while (!bool);
    }
  };
  public static final b e = new b()
  {
    protected void a()
    {
      int i = f.p;
      super.a();
      e locale1 = kb.h(this.h);
      t localt1 = new t(k.b_.e);
      localt1.a(k.c_.b);
      t localt2 = new t();
      localt2.a(k.c_.b);
      n localn1 = new n(k.b_.a, localt1, localt2);
      localn1.c((byte)1);
      a(locale1, localn1);
      if (i == 0) {
        if (locale1.e() != 2) {
          throw new IllegalStateException("May only be used with a binary tree.");
        }
      }
      e locale2 = locale1.h().f();
      e locale3 = locale1.h().i().f();
      t localt3 = new t(k.b_.b);
      localt3.a(k.c_.b);
      t localt4 = new t(k.b_.d);
      localt4.a(k.c_.b);
      n localn2 = new n(k.b_.c, localt3, localt4);
      a(locale2, localn2);
      a(locale3, localn2);
      r localr1 = new r(k.b_.b, k.b_.b);
      localr1.a(k.c_.b);
      localr1.a(1);
      r localr2 = new r(k.b_.d, k.b_.d);
      localr2.a(k.c_.b);
      localr2.a(1);
      if (i == 0)
      {
        if (locale2.e() != 2) {
          throw new IllegalStateException("May only be used with a binary tree.");
        }
        if (i != 0) {}
      }
      else if (locale3.e() != 2)
      {
        throw new IllegalStateException("May only be used with a binary tree.");
      }
      e locale4 = locale2.h().f();
      e locale5 = locale2.h().i().f();
      b(locale4, localr1);
      b(locale5, localr2);
      e locale6 = locale3.h().f();
      e locale7 = locale3.h().i().f();
      b(locale6, localr1);
      b(locale7, localr2);
    }
  };
  public static final b f = new b()
  {
    protected void a()
    {
      super.a();
      e locale1 = kb.h(this.h);
      r localr1 = new r(k.b_.d, k.b_.d);
      localr1.a(k.c_.b);
      localr1.a(1);
      r localr2 = new r(k.b_.b, k.b_.b);
      localr2.a(k.c_.b);
      localr2.a(1);
      n localn = new n(k.b_.a, localr1, localr2);
      a(locale1, localn);
      if (f.p == 0) {
        if (locale1.e() != 2) {
          throw new IllegalStateException("May only be used with a binary tree.");
        }
      }
      e locale2 = locale1.h().f();
      e locale3 = locale1.h().i().f();
      b(locale2, localr1);
      b(locale3, localr2);
    }
  };
  public static final b g = new b()
  {
    protected void a()
    {
      int k = f.p;
      boolean bool = f.o;
      super.a();
      e locale1 = kb.h(this.h);
      a(locale1, new m());
      a.f.n.o localo1 = new a.f.n.o(k.b_.c);
      a.f.n.o localo2 = new a.f.n.o();
      t localt1 = new t(k.b_.c);
      localt1.a(k.c_.a);
      t localt2 = new t();
      localt2.a(k.c_.a);
      int i = locale1.e() / 2;
      this.h = ((a.f.o)locale1.g());
      int j = 0;
      a.c.d locald = locale1.h();
      do
      {
        if (locald == null) {
          break;
        }
        e locale2 = locald.f();
        if (k == 0)
        {
          if (j < i)
          {
            a(locale2, localt1);
            d(locale2, localo1);
            if (k != 0) {
              continue;
            }
            if (!bool) {}
          }
          else
          {
            a(locale2, localt2);
          }
        }
        else {
          d(locale2, localo2);
        }
        j++;
        locald = locald.i();
      } while (!bool);
    }
  };
  protected a.f.o h;
  protected a.f.n.d i;
  protected x j;
  
  protected void a(e parame, gb paramgb)
  {
    this.j.a(parame, paramgb);
  }
  
  protected void b(e parame, gb paramgb)
  {
    a(parame, paramgb);
    d(parame, paramgb);
  }
  
  protected void d(e parame, gb paramgb)
  {
    boolean bool = f.o;
    a.c.d locald = parame.h();
    do
    {
      if (locald == null) {
        break;
      }
      e locale = locald.f();
      b(locale, paramgb);
      locald = locald.i();
    } while (!bool);
  }
  
  public final void a(a.f.n.d paramd, a.f.o paramo)
  {
    c(paramd, paramo);
    try
    {
      paramd.doLayout(this.h);
    }
    finally
    {
      a(this.h);
    }
    this.i = null;
    this.h = null;
  }
  
  protected void a()
  {
    this.j = this.h.B();
    this.h.a(a.f.n.d.w, this.j);
    this.h.a(a.f.n.d.y, new h_());
  }
  
  public void c(a.f.n.d paramd, a.f.o paramo)
  {
    this.h = paramo;
    this.i = paramd;
    if (f.p == 0)
    {
      if (paramo.j() == 0) {
        return;
      }
      a();
    }
  }
  
  public static void a(q paramq)
  {
    a.c.k localk = paramq.c(a.f.n.d.w);
    if (f.p == 0)
    {
      if ((localk != null) && ((localk instanceof x))) {
        paramq.a((x)localk);
      }
      paramq.j(a.f.n.d.w);
      paramq.j(a.f.n.d.y);
    }
  }
  
  class h_
    extends p
  {
    h_() {}
    
    public Object get(Object paramObject)
    {
      int i = f.p;
      gb localgb = (gb)b.this.j.get(paramObject);
      if (i == 0) {
        if ((localgb instanceof a.f.n.k)) {
          return ((a.f.n.k)localgb).c();
        }
      }
      if ((i != 0) || ((localgb instanceof j))) {
        return ((j)localgb).l();
      }
      return null;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.g.b

 * JD-Core Version:    0.7.0.1

 */